Jon's Git Node
Commit ff73e325024becd2c63187faef82cf4c558ef38e
Parents : 7bd3a3a
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-09-05T22:53:55+02:00
Images guide entry stub
Changes
Diff
diff --git a/nomadnet/ui/textui/Guide.py b/nomadnet/ui/textui/Guide.py
index aa97121..d245d26 100644
--- a/nomadnet/ui/textui/Guide.py
+++ b/nomadnet/ui/textui/Guide.py
@@ -91,6 +91,7 @@ class GuideColumns(urwid.Columns):
class GuideLinkDelegate:
def __init__(self, app, reader=None):
self.app = app
+ self.g = app.ui.glyphs
self.reader = reader
self.last_keypress = 0
@@ -100,6 +101,17 @@ class GuideLinkDelegate:
def micron_released_focus(self):
self.reader.focus_topics()
+ def resolve_image(self, url):
+ RNS.log(f"RESOLVE {url}")
+ if url.endswith("demo.webp"):
+ import os
+ import nomadnet.ui.textui.images as images_module
+ path = f"{os.path.dirname(images_module.__file__)}/demo.webp"
+ RNS.log(path)
+ return path
+
+ return None
+
def handle_link(self, target, fields=None):
if not target:
return
@@ -1450,6 +1462,7 @@ With micron you can easily create structured documents and pages with formatting
`F79d`_`[Links`#links]`_`f
`F79d`_`[Anchors`#anchors]`_`f
`F79d`_`[Tables`#tables]`_`f
+ `F79d`_`[Images`#images]`_`f
`F79d`_`[Fields & Requests`#fields-requests]`_`f
`F79d`_`[Comments`#comments]`_`f
`F79d`_`[Partials`#partials]`_`f
@@ -1776,6 +1789,20 @@ The above markup produces the following table:
| Orange | Ask, nicely | 3 |
`t
+>Images
+
+You can include images.
+
+`Faaa
+`=
+`(The RNS logo`w=60%`a=center`:/media/demo.webp)
+`=
+``
+
+If your terminal supports image rendering, the image will be displayed as specified. If not, a text placeholder is shown instead:
+
+`(The RNS logo`w=60%`a=center`:/media/demo.webp)
+
>Fields & Requests
Nomad Network lets you use simple input fields for submitting data to node-side applications. Submitted data, along with other session variables will be available to the node-side script / program as environment variables.
Served by rngit 1.5.4 - Generated in 0.02s